import lang from "../lang/zh-cn.js"
const checkMobile = data =>{
	var reg = /1[3456789][0-9]{9}$/;
	if(!reg.test(data)){
		uni.showToast({
			title: lang.mobile_invalid,
			icon : 'none'
		});
		return false;
	}else{
		return true;
	}
}
const checkCarNumber = data => {
	var regExp = /(^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1}$)/;
	        if(!regExp.test(data)){
	            uni.showToast({
	            	title: lang.carnumber_invalid,
	            	icon : 'none'
	            });
	            return false;
	        }else {
	            return true;
	        }

}
module.exports = {
	checkMobile,
	checkCarNumber
}